package com.wwforever.eclipsebuildunity3d;


import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;


public class MainActivity extends Activity
{
	public static Context mContext;
    @Override
 protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(getResources().getIdentifier("activity_main", "layout", getPackageName()));
        //layout.activity_main
        //getResources().getIdentifier()
        //context.getResources().getIdentifier("a", "drawable", context.getPackageName());
        //Button startButton = (Button)findViewById(R.id.startButton);
        Button startButton = (Button)findViewById(getResources().getIdentifier("startButton", "id", getPackageName()));
        startButton.setOnClickListener(mGoListener);

    }
    
    private OnClickListener mGoListener = new OnClickListener()
    {
        public void onClick(View v)
        {
        	//later.. this is rollDice
            Intent intent = new Intent(getApplicationContext(), MainActivity1.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
            startActivity(intent);
            //MainActivity1.type=0;
        }
    };

}